package cn.diancan.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Version;

import cn.diancan.util.DateUtil;

@Entity
public class Brand {

    private Long id;
    private String brandName;
    private String brandLogo;
    private String createTime;
    private String modifyTime;
    
    private Integer isDelete;
    private Integer version;
    
    @Version
    @Column(name="OPTLOCK",columnDefinition="int(11) DEFAULT 0")
    public Integer getVersion() {
        return version;
    }
    public void setVersion(Integer version) {
        this.version = version;
    }
    @Id
    @GeneratedValue
    public Long getId() {
        return id;
    }
    public void setId(Long id) {
        this.id = id;
    }
    public String getBrandName() {
        return brandName;
    }
    public void setBrandName(String brandName) {
        this.brandName = brandName;
    }
    @Column(columnDefinition="VARCHAR(500)")
    public String getBrandLogo() {
        return brandLogo;
    }
    public void setBrandLogo(String brandLogo) {
        this.brandLogo = brandLogo;
    }
    @Column(name="createTime",columnDefinition="DATETIME")
    public String getCreateTime() {
	return DateUtil.getMysqlDateTime(createTime);
    }
    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }
    @Column(name="modifyTime",columnDefinition="DATETIME")
    public String getModifyTime() { 
        return DateUtil.getMysqlDateTime(modifyTime);
    }
    public void setModifyTime(String modifyTime) {
        this.modifyTime = modifyTime;
    }
    public Integer getIsDelete() {
        return isDelete;
    }
    public void setIsDelete(Integer isDelete) {
        this.isDelete = isDelete;
    }

    
    
    
}
